package com.itheima.vo;

import com.alibaba.fastjson2.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <h1>webSocket服务端到客户端vo</h1>
 *
 * @author <a href="515857087@qq.com">叶世铭</a>
 * @since 2022/11/16
 */
@Data
@ApiModel("webSocket服务端到客户端vo")
public class WebsocketVo implements Serializable {
    private static final long serialVersionUID = 6686985048334026781L;
    /**
     * 发送者id
     */
    @ApiModelProperty(value = "发送者id")
    private String sendUserId;

    /**
     * 发送者名称
     */
    @ApiModelProperty(value = "发送者名称")
    private String sendUserName;

    /**
     * 发送者用户头像
     */
    @ApiModelProperty(value = "发送者用户头像")
    private String sendUserImageUrl;

    /**
     * id
     */
    @ApiModelProperty(value = "id", notes = "聊天内容id/通知id")
    private Integer id;

    /**
     * 标题
     */
    @ApiModelProperty(value = "标题", notes = "type为news时，该字段为null")
    private String title;

    /**
     * 内容
     */
    @ApiModelProperty(value = "内容")
    private String content;

    /**
     * 接收者id
     */
    @ApiModelProperty(value = "接收者id", required = true)
    private List<String> acceptIds;

    /**
     * 发布时间
     */
    @JSONField(name = "time")
    @ApiModelProperty(value = "发布时间", required = true)
    private LocalDateTime sendTime;

    /**
     * 通知内容开始时间
     */
    @ApiModelProperty(value = "通知内容开始时间", notes = "type为news时，该字段为null")
    private LocalDateTime startTime;

    /**
     * 通知内容结束时间
     */
    @ApiModelProperty(value = "通知内容结束时间", notes = "type为news时，该字段为null")
    private LocalDateTime endTime;

    /**
     * 通知状态
     */
    @ApiModelProperty(value = "通知状态", notes = "通知状态【发布】【修改】【取消】")
    private String status;

    /**
     * 种类
     */
    @ApiModelProperty(value = "种类", required = true, notes = "当前返回内容的种类，news为聊天内容，notice为通知内容,exception为异常信息")
    private String type;

    /**
     * 异常具体信息
     */
    @ApiModelProperty(value = "异常具体信息")
    private String exception;
}
